<?php

/*
 * Plugin Name: Sochy media
 * Plugin URI: http://intechhost.com
 * Description: Plugin sochy media is supported to image feature and it has more functionalities for use
 * Author: Sochy CHOEUN
 * Author URI: http://intechhost.com
 * Version: 1.0
 */

//function add_sochy_meta_boxes() {
//add_meta_box('sochy-meta-box', 'Sochy media', 'show_sochy_meta_box', 'post', 'normal', 'high');
//}
//add_action('add_meta_boxes', 'add_sochy_meta_boxes');
function my_admin_scripts() {
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_register_script('my-upload', WP_PLUGIN_URL . '/sochy-media/script-media.js', array('jquery', 'media-upload', 'thickbox'));
    wp_enqueue_script('my-upload');
}

function my_admin_styles() {
    wp_enqueue_style('thickbox');
}

if (isset($_GET['page']) && $_GET['page'] == 'my_plugin_page') {
    add_action('admin_print_scripts', 'my_admin_scripts');
    add_action('admin_print_styles', 'my_admin_styles');
}
?>
